var DeviceOrderModel = function (order) {
  BaseModel.call(this);
  var self = this;

  var fields = ['orderNo', 'companyOrderNo', 'productNo', 'custVersionNo', 'custOrderNo', 'feedTotal', 'orderTotal', 'deptId'];
  var fn = {
    initData: function (order) {
      self.setDataFromObj(order, fields, '');

      if (self.feedTotal === '') {
        self.feedTotal = undefined;
      }
      if (self.orderTotal === '') {
        self.orderTotal = undefined;
      }
    }
  };

  this.checkValid = function () {
    var fields = ['feedTotal', 'deptId'];
    return this.checkRequiredFields(fields);
  };

  this.getObject = function () {
    var postData = {};
    this.setPostData(postData, fields);
    return postData;
  };

  fn.initData(order);
};
